{% extends "base.html" %}

{% block title %}登录{% endblock %}

{% block content %}


    <div class="form-group">
        <form style="margin: 0 auto; width: 400px;" action="{% url "login" %}" method="post">
            {{ form.as_p }}
            {% csrf_token %}
            <input type="hidden" name="next" value="{{ next }}"/>
            <a href="{% url "password_reset" %}">忘记密码？</a> <a href="{% url "register" %}">注册新帐号</a>
            <p><input type="submit"  value="登录"></p>
            {% if form.errors %}
                <p>用户名或者密码不匹配</p>
            {% else %}
            {% endif %}
        </form>
    </div>
{% endblock %}